<div class="margin file-list">
    {% for item in data.items %}
        <div class="{{ item.content_type }} thumbnail data-delete-box">
            {% if in_array(strtolower(item.content_type),['png','jpeg','gif','jpg']) %}
                <a href="{{ filePath(item) }}">
                    <img src="{{ filePath(item) }}" alt="{{ item.name }}" class="img-rounded">
                </a>
                <div class="caption">
                    <p class="file-name"><small>{{ item.name }}</small></p>
                    <p>
                        <a class="delete pull-left" href="{{ filePath(item) }}" data-toggle="tooltip" target="_blank" data-placement="top" title="下载"><i class="fa fa-fw fa-download"></i></a>
                        <a class="delete pull-right" data-delete="ajax" data-toggle="tooltip" target="_blank" data-placement="top" title="删除" href="{{ url(['for':'adminFileDelete','id':item.id]) }}"><i class="fa fa-fw fa-trash"></i></a>
                    </p>
                </div>
            {% else %}
                <a href="{{ filePath(item) }}">
                    <img src="{{ file_type_icon(item.content_type) }}" alt="{{ item.name }}" class="img-rounded">
                </a>
                <div class="caption">
                    <p class="file-name"><small>{{ item.name }}</small></p>
                    <p>
                        <a class="pull-left" href="{{ filePath(item) }}" data-toggle="tooltip" target="_blank" data-placement="top" title="下载"><i class="fa fa-fw fa-download"></i></a>
                        <a class="delete pull-right" data-delete="ajax" data-toggle="tooltip" target="_blank" data-placement="top" title="删除" href="{{ url(['for':'adminFileDelete','id':item.id]) }}"><i class="fa fa-fw fa-trash"></i></a>
                    </p>
                </div>
            {% endif %}
        </div>
    {% endfor %}
</div>

<div class="space-8"></div>
{{ partial("Themes/AdminLTE/templates/paginator") }}
<style type="text/css">
    .file-list > div img {
        height: 100px;
        width: auto;
    }

    .file-list > div {
        display: inline-block;
        margin: 10px 15px;
    }

    .file-list > div > span {
        display: block;
    }
</style>